home *** CD-ROM | disk | FTP | other *** search
- on SETUPPUSHERS
- global PH, PUSHON, TURN, SOND, GRIDV, GOODROW, TEM, GOOD, NWGAME
- set GOODROW to []
- set PUSHON to 1
- set TEM to 0
- if NWGAME = 1 then
- exit
- end if
- repeat with N = 11 to 24
- if TURN = 2 then
- set the castNum of sprite N to N + 120
- end if
- if TURN = 1 then
- set the castNum of sprite N to N + 24
- end if
- end repeat
- repeat with N = 31 to 44
- if TURN = 2 then
- set the castNum of sprite N to N + 115
- end if
- if TURN = 1 then
- set the castNum of sprite N to N + 23
- end if
- end repeat
- repeat with N = 1 to 14
- set TEM to N
- if TURN = 1 then
- repeat with NN = 1 to 10
- if getAt(GRIDV, TEM) = 2 then
- append(GOODROW, N)
- end if
- if getAt(GRIDV, TEM) = 2 then
- exit repeat
- end if
- set TEM to TEM + 14
- end repeat
- end if
- if TURN = 2 then
- repeat with NN = 1 to 10
- if getAt(GRIDV, TEM) = 3 then
- append(GOODROW, N)
- end if
- if getAt(GRIDV, TEM) = 3 then
- exit repeat
- end if
- set TEM to TEM + 14
- end repeat
- end if
- end repeat
- set PH to 0
- repeat with N = 11 to 24
- set PH to PH + 1
- set GOOD to 0
- repeat with C = 1 to count(GOODROW)
- if PH = getAt(GOODROW, C) then
- set GOOD to 1
- end if
- end repeat
- if GOOD = 1 then
- set the locH of sprite N to getAt(GRIDH, PH) + 3
- set the locV of sprite N to getAt(GRIDY, 127) + 36
- set the locH of sprite (N + 20) to getAt(GRIDH, PH)
- set the locV of sprite (N + 20) to getAt(GRIDY, PH) - 96
- end if
- end repeat
- if SOND = 0 then
- puppetSound("SOND1")
- end if
- updateStage()
- end
-